import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [

   {
    title: '工程编号',
    align:"center",
    dataIndex: 'gcbh'
   },

   {
    title: '工程队名',
    align:"center",
    dataIndex: 'gcName'
   },

   {
    title: '联系电话',
    align:"center",
    dataIndex: 'phone'
   },

   {
    title: '联系人',
    align:"center",
    dataIndex: 'reman'
   },

   {
    title: '开户名称',
    align:"center",
    dataIndex: 'khmc'
   },

   {
    title: '开户银行',
    align:"center",
    dataIndex: 'khyh'
   },

   {
    title: '开户帐号',
    align:"center",
    dataIndex: 'khzh'
   },


];
//查询数据
export const searchFormSchema: FormSchema[] = [
  {
    label: '工程队名',
    field: 'gcName',
    component: 'JInput',

  },
];
//表单数据
export const formSchema: FormSchema[] = [

  {
    label: '工程编号',
    field: 'gcbh',
    component: 'Input',
  },

  {
    label: '工程队名',
    field: 'gcName',
    component: 'Input',
    dynamicRules: ({model,schema}) => {
          return [
                 { required: true, message: '请输入工程队名!'},
          ];
     },
  },

  {
    label: '联系电话',
    field: 'phone',
    component: 'Input',
  },

  {
    label: '联系人',
    field: 'reman',
    component: 'Input',
  },

  {
    label: '开户名称',
    field: 'khmc',
    component: 'Input',
  },

  {
    label: '开户银行',
    field: 'khyh',
    component: 'Input',
  },

  {
    label: '开户帐号',
    field: 'khzh',
    component: 'Input',
  },

	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];



/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
  // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}
